import { Component } from '@angular/core';

import * as Parse from "parse"


@Component({
  selector: 'app-page-my',
  templateUrl: './page-my.component.html',
  styleUrls: ['./page-my.component.scss']
})

export class PageMyComponent {
  username:string = ""
  password:string = ""
  userData:Parse.User|undefined
  constructor(){
    this.userData = Parse.User.current();
  }
    login(){
      Parse.User.logIn(this.username,this.password).then(userdata=>{
        this.userData = userdata
      })
    }
    logout(){
      Parse.User.logOut();
      this.userData = undefined
    }
}
